<?php

use yii\db\Migration;
use yii\db\Schema;

class m170801_075844_ADD_COLUMN_PRODUCT_ROOM_SELL_OUT extends Migration
{
    public function up()
    {
         $this->addColumn('{{product_room}}', 'sell_out', Schema::TYPE_INTEGER. "(1) DEFAULT 0 COMMENT '是否售罄 0没有 1有' ");
    }

    public function down()
    {
        echo "m170801_075844_ADD_COLUMN_PRODUCT_ROOM_SELL_OUT cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
